package com.h3c.nem.client;

import cn.hutool.json.JSONObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author chenyifan
 * @date 2022/6/9 15:37
 */
@FeignClient(name = "dept-manage", url = "${dept.url}")
public interface DeptClient {

    /**
     * 根据岗位编码获取部门名称
     * @param postId
     * @return
     */
    @GetMapping(value = "bdPost/getDeptNameByPostId")
    List<String> getDeptNameByPostId(@RequestParam String postId);

    /**
     * 根据岗位编码获取岗位名称
     * @param postId
     * @return
     */
    @GetMapping(value = "bdPost/getPostNameByPostId")
    String getPostNameByPostId(@RequestParam String postId);

    /**
     * 根据最小部门编码获取部门层级信息
     * @param deptId
     * @return
     */
    @GetMapping(value = "bdDept/getDeptInfoByDeptId")
    JSONObject getDeptInfoByDeptId(@RequestParam String deptId);
}
